Skip to content

Comments

Add vws generate-vumark command#1968

Open
adamtheturtle wants to merge 28 commits intomainfrom
adamtheturtle/add-vumark-support
Open

Add vws generate-vumark command#1968
adamtheturtle wants to merge 28 commits intomainfrom
adamtheturtle/add-vumark-support

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 19, 2026

Summary

Adds a vws generate-vumark CLI command that wraps VWS.generate_vumark_instance() from vws-python (VWS-Python/vws-python#2858). The command accepts a target ID, instance ID, and output format (PNG/SVG/PDF, defaulting to PNG), and writes the generated VuMark image bytes to a file.

Error handling covers invalid instance IDs, targets not in the success state, unknown targets, and authentication failures. Tests use the existing MockVWS/VuforiaDatabase fixtures and will pass once the vws-python PR is merged and the dependency is updated.

🤖 Generated with Claude Code


Note

Medium Risk
Introduces a new CLI surface and expands the release pipeline to produce and attach additional binaries, which could affect packaging/release stability. Core VWS behavior isn’t modified; changes are mostly additive with test coverage.

Overview
Adds a new standalone vumark CLI command that calls VuMarkService.generate_vumark_instance, supports --format (png/svg/pdf), and writes the returned bytes to an output file with dedicated error handling for common VWS failures.

Updates the release workflow to build/upload vumark PyInstaller binaries for Linux/Windows/macOS (while explicitly not publishing a WinGet package yet), and updates docs/README/help regression fixtures plus new tests and mock VuMark DB fixtures to cover the new command end-to-end.

Written by Cursor Bugbot for commit a8c6497. This will update automatically on new commits. Configure here.

adamtheturtle and others added 21 commits February 22, 2026 01:59
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `vumark` command is now its own binary/entrypoint, following the
same pattern as `vuforia-cloud-reco`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mock-vws does not yet handle unknown targets or target status
validation for VuMark generation. Mark those tests as expected
failures and exclude untestable error paths from coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mock-vws now handles VuMark generation and unknown target errors, so
the monkeypatching workarounds are no longer needed. Add vumark_database,
vumark_target, and vumark_client fixtures to conftest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bility

The [tool.pytest] section (introduced by main's a30cb99 commit) was wrong
and should be [tool.pytest.ini_options]. Also add --capture=no to avoid
a conflict between pytest's stdout/stderr capture and Click 8.3.1's
CliRunner StreamMixer, which causes ValueError: I/O operation on closed file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the private _get_vumark_error_message helper and its unit tests.
The three testable error paths (UnknownTargetError, InvalidInstanceIdError,
TargetStatusNotSuccessError) are now tested via CliRunner. Remaining error
paths are grouped under a single pragma: no cover branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rowing

Pylint does not narrow the type of `exc` from `VWSError | ServerError`
to the specific subtype within isinstance blocks, causing false positives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The leading underscore made pyright treat the function as private to its
module, causing reportPrivateUsage errors in commands.py and vumark.py.
The _error_handling module name already signals it's package-internal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Catching (UnknownTargetError, TargetStatusNotSuccessError) in a dedicated
except clause means both types are already known to have target_id, so
no pylint no-member suppressions are needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adamtheturtle and others added 2 commits February 22, 2026 02:11
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.


.. code-block:: console
$ docker run --rm --entrypoint vumark "ghcr.io/vws-python/vws-cli" --help
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing scripts.vumark entry in pyproject.toml breaks Docker

High Severity

The documentation tells users to run docker run --rm --entrypoint vumark ..., but pyproject.toml is missing a scripts.vumark entry (only scripts.vws and scripts.vuforia-cloud-reco exist). The Docker image installs the package via uv pip install, which only creates console scripts declared in pyproject.toml. Without scripts.vumark = "vws_cli.vumark:generate_vumark", the vumark command won't exist in the Docker image or any pip-based installation, making all the Docker documentation and pip usage broken.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant